package com.doit.demo01;

import java.util.concurrent.ArrayBlockingQueue;

public class test02 {
    public static void main(String[] args) throws InterruptedException {
        ArrayBlockingQueue<Integer> integers = new ArrayBlockingQueue<>(5);
        boolean offer = integers.offer(12);
        System.out.println(offer);
        integers.put(23);
        integers.put(8);
        integers.put(8);
        integers.put(8);
        integers.take();//取走一个即可
        integers.put(8);//第六个
        System.out.println(integers);
    }
}
